package com.tidy.seed.admin.system.vo;

import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.io.Serializable;

/**
 * FindMenuIdsByRoleIdVo VO
 * 描述：
 *
 * @author 59717
 * @date 2025-08-06
 */
@Data
@ApiModel(description = "值对象")
public class FindMenuIdsByRoleIdVO implements Serializable {
    private Integer menuId;
    private Integer parentId;
    private Boolean hasChildren;

    // 自定义getter方法，实现hasChildren的逻辑
    public Boolean getHasChildren() {
        // 如果parentId为-1，则hasChildren固定为false
        return parentId == -1;
    }

    // 注意：lombok的@Data会自动生成setter，若需要手动控制可重写setter
    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }
}
    